

age = 33
count = 0
for i in range(10):
    #guess_age = int(input("请输入年龄："))  #放到此位置，需要输入错误四次
    if count == 3:
        user = input("是否继续？")#.strip()  #????
        if user == "y":
            count = 0
        else:
            break
    guess_age = int(input("请输入年龄："))  #int表示必须输入整数；放到此位置，输入三次错误则退出
    if guess_age == age:
        print("OK!")
        break
    elif guess_age > age:
        print("猜大了")
    else:
        print("猜小了")
    count +=1